package com.yh.wcx.filter;


import org.springframework.beans.factory.annotation.Value;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;
@WebFilter(urlPatterns = "/*", filterName = "wcxFilter")
public class MyFilter implements Filter {
    @Value("${dynamic.filterTip}")
    private String tip;

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        System.out.println("过滤器 从配置文件获取的动态参数"+tip);
        filterChain.doFilter(servletRequest,servletResponse);
    }
}
